<link rel="stylesheet" href="__PUBLIC__/css/jquery.treeview.css" />
<link rel="stylesheet" href="__PUBLIC__/css/jquery.screen.css" />
<script src="__PUBLIC__/js/jquery.treeview.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/jquery.cookie.js" type="text/javascript"></script>
<section id="content">

    <div class="page page-fullwidth-layout">

        <div class="pageheader">

            <h2>{$data.module_name}</h2>

            <div class="page-bar">

                <ul class="page-breadcrumb">
                    <li>
                        <a href="{:url('/admin')}"><i class="fa fa-home"></i> 起始页</a>
                    </li>
                    <li>
                        <a href="{:url($data.module_url)}">{$data.module_name}列表</a>
                    </li>
                </ul>

            </div>

        </div>

        <!-- page content -->
        <div class="pagecontent">

            <!-- row -->
            <div class="row">
                <!-- col -->
                <div class="col-md-12">




                    <!-- tile -->
                    <section class="tile">

                        <!-- tile header -->
                        <div class="tile-header dvd dvd-btm">
                            <h1 class="custom-font"><strong>{$data.module_name}</strong> 列表</h1>
                            <ul class="controls">
                                <li><a href="{:url($data.module_url.'create')}"><i class="fa fa-plus mr-5"></i> 新增</a></li>
                            </ul>
                        </div>
                        <!-- /tile header -->

                        <!-- tile body -->
                        <div class="tile-body">
                            <div class="alert alert-info" style="display:none;">显示一些提示信息</div>
                            <div id="sidetreecontrol"> <a href="?#">收起全部</a> | <a href="?#">展开全部</a> </div>
                            <ul class="treeview" id="tree">
                                <li class="expandable">
                                    <div class="hitarea expandable-hitarea"></div>
                                    <span>节点目录</span>
                                    <ul style="display: none;">
                                        {if($permission)}
                                        {foreach $permission as $key=>$v)}
                                        <li class="expandable">
                                            <div class="hitarea expandable-hitarea"></div>
                                            <a href="{:url($data.module_url.$v['id'])}">{$v['name']}</a>
                                            {if isset($v['child']) && count($v['child']) > 0}
                                            <ul style="display: none;">
                                                {foreach $v['child'] as $vo_item)}
                                                <li>
                                                    <a href="{:url($data.module_url.$vo_item['id'])}">{$vo_item['name']}</a>
                                                </li>
                                                {/foreach}
                                            </ul>
                                            {/if}
                                        </li>
                                        {/foreach}
                                        {/if}
                                    </ul>
                                </li>
                            </ul>
                            <div class="clear"></div>

                        </div>
                        <!-- /tile body -->

                    </section>
                    <!-- /tile -->

                </div>
                <!-- /col -->
            </div>
            <!-- /row -->




        </div>
        <!-- /page content -->
        <script type="text/javascript">
            $(function() {
                $("#tree").treeview({
                    collapsed:false,
                    animated: "fast",
                    control: "#sidetreecontrol",
                    persist: "location"   //cookie刷新页面保持原状；location不保持
                });
            })
        </script>

    </div>

</section>
<!--/ CONTENT -->

